package org.fujie.plugin.cloud.face.provider.server;

import com.fasterxml.jackson.core.JsonProcessingException;
import org.fujie.plugin.cloud.core.model.RecognizedIdCardScanRes;
import org.fujie.plugin.cloud.core.provider.config.BaseConfig;
import org.fujie.plugin.cloud.core.provider.service.BaseService;

/**
 * @author slm
 * @description 各云服务商服务抽象
 */
public abstract class ProviderService<C extends BaseConfig> implements BaseService {

    private final C config;

    protected ProviderService(C config) {
        this.config = config;
    }

    protected C getConfig() {
        return config;
    }

    /**
     * @param frontUrl 国徽面图片网络地址
     * @author sunliming
     * @description 身份证国徽面识别
     */
    public abstract RecognizedIdCardScanRes recognizeIdFrontCard(String frontUrl) throws JsonProcessingException;

    /**
     * @param backUrl 人像面图片地址
     * @author sunliming
     * @description 身份证人像面识别
     */
    public abstract RecognizedIdCardScanRes recognizeIdBackCard(String backUrl) throws JsonProcessingException;

}
